#include<stdio.h>
#include<mpi.h>

int main(int argc, char **argv)
{
	int myid, numprocs;
	MPI_Aint address1, address2, address3;
	int a, b, c, dist1, dist2;
	
	a = 1;
	b = 2;
	c = 3;
	
	MPI_Init(&argc, &argv);

	MPI_Comm_rank(MPI_COMM_WORLD, &myid);
    MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
	
	
	// your code here
	MPI_Address(&a, &address1);
	MPI_Address(&b, &address2);
	MPI_Address(&c, &address3);
	// end of your code
	
	dist1 = address2 - address1 ;
	dist2 = address3 - address1 ;
	
	if(myid == 0) {
		printf("The distance between a and b is %d\n", dist1);
		printf("The distance between a and c is %d\n", dist2);
	}

	MPI_Finalize();
	return 0;
}
